﻿using System.Data;
using System.Runtime.Serialization;
using System.ServiceModel;

namespace HRMService
{
    [ServiceContract(Namespace = "http://HRMService")]
    public interface IRegion
    {
        [OperationContract]
        int Region_Using(int RegionID);

        [OperationContract]
        DataSet Region_GetAll();

        [OperationContract]
        RegionInfo Region_GetInfo(int RegionID);

        [OperationContract]
        DataSet Region_GetList(out int ItemCount, int currentPage, int pageSize);

        [OperationContract]
        int Region_Insert(RegionInfo eInfo);

        [OperationContract]
        bool Region_Update(RegionInfo eInfo);

        [OperationContract]
        bool Region_Delete(int RegionID);

        [OperationContract]
        bool Region_Exist(string _Code);
    }
    [DataContract(Namespace = "http://HRMService")]
    public class RegionInfo
    {
        int _ID;
        [DataMember]
        public int ID
        {
            get { return _ID; }
            set { _ID = value; }
        }

        string _Code;
        [DataMember]
        public string Code
        {
            get { return _Code; }
            set { _Code = value; }
        }
        string _Name;
        [DataMember]
        public string Name
        {
            get { return _Name; }
            set { _Name = value; }
        }
    }
}
